<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>就业信息</title>

<link type="text/css" rel="stylesheet" href="<%=basePath%>css/main.css">

<script type="text/javascript"
	src="<%=basePath %>js/jquery-1.4.2.min.js"></script>

<script type="text/javascript"
	src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>


<script type="text/javascript">
				
				function checkData() {

	var workingCompany = $("input[name='workingCompany']");
	var salary = $("input[name='salary']");
	var enterCompanyTime = $("input[name='enterCompanyTime']");

	if ($.trim(workingCompany.val()) == '' || $.trim(salary.val()) == ''
			|| isNaN($.trim(salary.val()))
			|| $.trim(enterCompanyTime.val()) == '' || $.trim(salary.val()) < 0) {
		alert("入职时间、就职公司与年薪不能为空，并且薪水应该是有效的数字");
		return false;
	} else {
		document.JobInfo.submit();
	}

}
				
			
			
			</script>


</head>
<body>

<form action="<%=basePath%>jobInfo?action=update" method="post"
	name="JobInfo">

<table class="TableBlock" width="450" align="center">


	<tr>
		<td colspan="2" class="TableHeader">编辑业信息</td>
	</tr>

	<tr>
		<td class="TableData">班级： <input type="hidden" name="jobInfoID"
			value="${jobInfo.jobInfoID }"></td>
		<td class="TableData"><select name="stuClassId">
			<option value="${jobInfo.user.stuClassId}">
			${jobInfo.user.className}</option>
		</select></td>
	</tr>

	<tr>
		<td class="TableData">姓名：</td>

		<td class="TableData"><select name="uid">
			<option value="${jobInfo.user.uid}">
			${jobInfo.user.userName}</option>
		</select></td>
	</tr>

	<tr>
		<td class="TableData">就职公司：</td>
		<td class="TableData"><input type="text" name="workingCompany"
			value="${jobInfo.workingCompany}" /> <input type="hidden"
			name="role" value="${requestScope.role}" /></td>
	</tr>

	<tr>
		<td class="TableData">入职时间：</td>
		<td class="TableData"><input type="text" name="enterCompanyTime"
			class="Wdate" value="${jobInfo.enterCompanyTime}"
			onclick="WdatePicker()" /></td>
	</tr>

	<tr>
		<td class="TableData">离职时间：</td>
		<td class="TableData"><input type="text" name="leaveCompanyTime"
			value="至今" class="Wdate" onclick="WdatePicker()"
			value="${jobInfo.leaveCompanyTime}" /></td>
	</tr>

	<tr>
		<td class="TableData">年薪：</td>
		<td class="TableData"><input type="text" name="salary"
			value="${jobInfo.salary}" /></td>
	</tr>

	<tr>
		<td class="TableData">状态：</td>
		<td class="TableData"><select name="visiable">
			<c:choose>
				<c:when test="${jobInfo.visiable == 1}">
					<option value="1" selected="selected">公开</option>
					<option value="0">不公开</option>
				</c:when>

				<c:otherwise>
					<option value="1">公开</option>
					<option value="0" selected="selected">不公开</option>
				</c:otherwise>
			</c:choose>


		</select></td>
	</tr>
	<tr align="center" class="TableControl">

		<td colspan="2"><input type="button" value="保存就业信息"
			class="BigButton" onclick="checkData()"></td>
	</tr>
</table>

</form>

</body>


</html>
